oh-my-posh pure theme
A modified theme based on the oh-my-posh pure theme, which only adds python environment display. To use it, just add notepad $profile
, and then add one line
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/pure.omp.json"| Invoke-Expression
.
Use Powshell 7 is a good option by the way.
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#BF616A",
"style": "plain",
"template": "{{ .UserName }} ",
"type": "session"
},
{
"foreground": "#81A1C1",
"properties": {
"style": "full"
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"style": "diamond",
"properties": {
"fetch_virtual_env": true,
"display_mode": "environment",
"home_enabled": true,
"display_virtual_env": true,
"display_default": true
},
"template": "({{ .Venv }})",
"type": "python"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "#6C6C6C",
"properties": {
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
"branch_icon": "",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"github_icon": ""
},
"style": "plain",
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "darkGray",
"style": "plain",
"template": "[{{ .CurrentDate | date .Format }}]",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#B48EAD",
"foreground_templates": [
"{{ if gt .Code 0 }}#BF616A{{ end }}"
],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "\u276f ",
"type": "status"
}
],
"type": "prompt"
}
],
"console_title_template": "{{if .Root}}(Admin){{end}} {{.PWD}}",
"transient_prompt": {
"foreground": "#B48EAD",
"foreground_templates": [
"{{ if gt .Code 0 }}#BF616A{{ end }}"
],
"template": "\u276f "
},
"version": 2
}